<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/commons/global.jsp" %>
<style>
</style>
<script type="text/javascript">
    $(function () {
        $('#setTaskAssignee').form({
            url : '${path }/process/setTaskAssignee?processInstanceId=${processInstanceId}',
            onSubmit : function() {
                progressLoad();
                var isValid = $(this).form('validate');
                if (!isValid) {
                    progressClose();
                }
                return isValid;
            },
            success : function(result) {
                progressClose();
                result = $.parseJSON(result);
                if (result.success) {
                    showMsg("设置成功！请刷新！");
                    dialog.dialog('close');
                } else {
                    var form = $('#setTaskAssignee');
                    parent.$.messager.alert('提示', result.msg, 'warning');
                }
            }
        });
    })
</script>
<div class="easyui-layout" data-options="fit:true,border:false">
    <div data-options="region:'center',border:false">
        <form id="setTaskAssignee">
        <table class="grid" data-options="border:false">
        <c:forEach items="${vos}" var="vo">
            <tr>
                <td>任务名称</td>
                <td>${vo.taskName}</td>
                <td>
                    任务执行人
                </td>
                <td>
                    <input type="hidden" name="userId_${vo.taskId}" id="userId_${vo.taskId}" value="${vo.userId}"/>
                    <input type="text" name="userName_${vo.taskId}" class="easyui-text-2" id="userId_${vo.taskId}_disp" readonly="readonly" value="${vo.userName}"/>
                    <a href="javascript:void(0)" onclick="selectUser(false,'userId_${vo.taskId}','userId_${vo.taskId}_disp')" class="easyui-linkbutton">选择</a>
                </td>
            </tr>
        </c:forEach>
        </table>
        </form>
    </div>
</div>
